﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Tradex.Market {

    /// <summary>
    /// The MarketUpdateFlags define additional mode about the MarketUpdate data. They are mostly used in the MarketUpdateType.Mode
    /// notifications.
    /// </summary>
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028")]
    [Flags()]
    public enum MarketModes : byte {

        /// <summary>
        /// The market mode is undefined. A mode of this type contains no information about the market mode.
        /// </summary>
        None = 0,

        /// <summary>
        /// The market is open..
        /// </summary>
        Open = 1,

        /// <summary>
        /// The market is closed.
        /// </summary>
        Closed = 2,

        /// <summary>
        /// The market is in pre-open stage.
        /// </summary>
        PreOpen = 4,

        /// <summary>
        /// The market has been halted by exchange decision. Trading is suspended. It may reopen at any time.
        /// This is normal the result of unexpected incidents or market behavior.
        /// </summary>
        Halted = 8,

        /// <summary>
        /// The market is in limited mode. No trades execute. Entering orders is ok, but cancel of orders is not allowed.
        /// This is a state, for example, set by the CME 30 seconds before opening to reduce load on servers - order entry
        /// and modification is allowed, but no cancel. Trades will NOT execute.
        /// </summary>
        NoCancel = 9,

        /// <summary>
        /// There was a market mode transfer from the exchange, but the status could not be mapped to one of the stati supported
        /// by Tradex. The data has been reported in a separate error stream, ending data correction.
        /// </summary>
        Error = 10
    }

}
